package com.hxkj.client.service;

import com.github.pagehelper.PageInfo;
import com.hxkj.domain.po.DictItem;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


/**
 * 二级字典列表 服务层
 * <p>
 * Created by zzx on 2018/5/15.
 */
@FeignClient(name = "cms-management")
public interface DictItemServiceClient {
    /**
     * 获取一个字典列表  二 级（子类）
     *
     * @param
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<PageInfo> getlist(@RequestBody ParameterDataStruct<DictItem> parameterDataStruct) throws Exception;

    /**
     * 获取一个字典信息  二 级（子类）
     *
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<DictItem> get(@RequestBody DictItem dictItem) throws Exception;

    /**
     * 新增字典      二 级（子类）
     *
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct saveDictItem(@RequestBody DictItem dictItem) throws Exception;

    /**
     * 删除一个字典信息   二 级（子类）
     *
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct deleteDictItem(@RequestBody DictItem dictItem) throws Exception;

    /**
     * \
     * 修改一个字典信息   二 级（子类）
     *
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct updateDictItem(@RequestBody DictItem dictItem) throws Exception;


    /**\
     *禁用一个 二级 字典
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/update",method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifyDictItem(@RequestBody DictItem dictItem) throws Exception;


    /**
     *  获取一个字典下拉框  二 级（子类）
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/comboBox", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<List<DictItem>> comboBox(@RequestBody DictItem dictItem) throws Exception;

    /**
     * 通过字典明细名称获取字典明细
     * @param dictItem
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictItem/getDictItemByDictType", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<List<DictItem>> getDictItemByDictType(@RequestBody DictItem dictItem);
}


